#!/bin/bash

set -e
set -x

# https://github.com/sigoden/dufs/releases/download/v0.43.0/dufs-v0.43.0-x86_64-unknown-linux-musl.tar.gz
bypy download dufs-v0.43.0-x86_64-unknown-linux-musl.tar.gz
tar xf dufs-v0.43.0-x86_64-unknown-linux-musl.tar.gz -C /usr/bin/
cp dufs.service /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable --now dufs

set +x
set +e

# 
# curl -C - -u admin:123456 -O http://192.168.122.133/file/dufs-v0.43.0-x86_64-unknown-linux-musl.tar.gz
# wget -c --http-user=admin --http-password=123456  http://192.168.122.133/file/dufs-v0.43.0-x86_64-unknown-linux-musl.tar.gz